package com.funever.entity;

import java.util.LinkedList;
import java.util.List;
import com.activeandroid.Model;
import com.activeandroid.annotation.Column;
import com.activeandroid.annotation.Table;
import com.activeandroid.query.Select;

@Table(name="Works")
public class Works extends Model{
	
	@Column(name = "workDate")
	String date;
	
	@Column(name = "workType")
	String workType;
	
	
	public static List<Works> findAll(){
		List<Works> wl = new LinkedList<Works>();
		Select select =  new Select();
		wl = select.from(Works.class).execute();
		return wl;
	}
	
	public static Works findByWhere(String where){
		Select select =  new Select();
		return select.from(Works.class).where(where).executeSingle();
	}
	
	public static List<Works> findAllByWhere(String where){
		Select select =  new Select();
		return select.from(Works.class).where(where).execute();
	}
	
	public String getDate() {
		return date;
	}

	public void setDate(String date) {
		this.date = date;
	}

	public String getWorkType() {
		return workType;
	}

	public void setWorkType(String workType) {
		this.workType = workType;
	}
}
